<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2022/12/29
  Time: 14:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="css/includePage.css">
    <link rel="stylesheet" href="css/bookHomePage.css">
    <link rel="stylesheet" href="css/bookDetails.css">
    <script src="https://kit.fontawesome.com/e91f25b25e.js" crossorigin="anonymous"></script>
    <title>图书管理系统-详情</title>
</head>
<%@ include file="IncludePage.jsp"  %>

<div class="book-table">
    <a href="bookHome"><button class="btn return">返回>></button></a>
    <div class="bookPic" id="book${sessionScope.book.bookId}"></div>
    <div class="bookInfo">
        <p style="font-size: 20px;color: #215496;position: relative;right: 10px;bottom: 30px;">${sessionScope.book.bookName}</p><br>
        <p>${sessionScope.book.bookAuthor}</p><br>
        <p>标签：${sessionScope.book.bookClass}</p><br>
        <p>出版社：${sessionScope.book.bookPress}</p><br>
        <p>详情：${sessionScope.book.bookDescription}</p><br>
        <p>库存：${sessionScope.book.bookInventory}</p>
        <button class="btn" onclick="alert('借阅成功')">借阅</button>
    </div>
</div>
<script src="js/includePage.js"></script>
<script src="js/message.js"></script>
<script>
    function loadPic(){
        var pic=document.getElementsByClassName("bookPic");
        var name = pic[0].id;
        console.log(name);
        pic[0].style.backgroundImage = 'url(/images/' + name + '.jpeg)';
    }

    loadPic();
</script>
</body>
</html>